set(libname texteditor)
set(exename exe_builder)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/headers)
add_library(${libname} SHARED impl.cpp)
add_executable(${exename} main.cpp)
target_link_libraries(${exename} PUBLIC ${libname})

configure_file(./start_test.sh ${CMAKE_BINARY_DIR}/07-Builder/start_test.sh COPYONLY)

# start test scripts
add_custom_command(TARGET ${exename} POST_BUILD
    COMMAND sh ${CMAKE_BINARY_DIR}/07-Builder/start_test.sh
    WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/07-Builder/
    COMMENT "launching tests scripts"
)
